using System;
using System.Data.SqlTypes;
using System.Diagnostics;

namespace FlexySys.Common.Extension
{
    public static class DateTimeExtension
    {
        private static readonly DateTime MinDate = SqlDateTime.MinValue.Value;
        private static readonly DateTime MaxDate = SqlDateTime.MaxValue.Value;

        //[DebuggerStepThrough]
        public static bool IsSqlValid(this DateTime target)
        {
            return (target >= MinDate) && (target <= MaxDate);
        }
    }
}